#!/bin/bash

MYSQL_USER="root"
MYSQL_PASSWORD="your_password"
MYSQL_DB="your_database"

FUEL_TYPES=("天然气", "汽油", "液化石油气", "柴油", "污水")
BRANDS=("丰田", "本田", "长城", "福特")

for i in {1..10}
do
    VEHICLE_ID="车辆编号$i"
    FUEL_TYPE="${FUEL_TYPES[$(($RANDOM % 5))]}"  # 随机从列表中选择一种燃油类型。
    BRAND="${BRANDS[$(($RANDOM % 4))]}"
    NUMBER_PLATE="鲁AQKE$(shuf -i 1000-9999 -n 1)"
    QUERY="INSERT INTO your_table (vehicle_id, fuel_type, brand, number_plate) VALUES ('$VEHICLE_ID', '$FUEL_TYPE', '$BRAND', '$NUMBER_PLATE');"
    # mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -D $MYSQL_DB -e "$QUERY"
    echo "$QUERY"
done
